-- GENERATED SPELL FOR [Stormforged Monitor] --


function spell0_29862(pUnit, Event) --@Lightning Charged,Self--
pUnit:FullCastSpellOnTarget(52701,pUnit)
pUnit:RegisterEvent('Sorts_29862', 30260, 1)
end

function spell1_29862(pUnit, Event) --@Lightning Infusion,n/a--
pUnit:FullCastSpellOnTarget(57580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29862', 5000, 1)
end

function Sorts_29862(pUnit, Event)
local choix_sorts_29862 = math.random(0, 1)
if choix_sorts_29862 == 0 then
pUnit:RegisterEvent('spell0_29862', 1, 1)
end
if choix_sorts_29862 == 1 then
pUnit:RegisterEvent('spell1_29862', 1, 1)
end
end

function mob29862_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29862', math.random(1500, 3000), 1)
end

function mob29862_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29862_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29862_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29862, 1, 'mob29862_Action')
RegisterUnitEvent(29862, 2, 'mob29862_Leave')
RegisterUnitEvent(29862, 3, 'mob29862_Kill')
RegisterUnitEvent(29862, 4, 'mob29862_Die')
